﻿using System;
using System.Text;
using System.Web;
using System.Xml;

namespace Com.Toook.AutoDownloadHtml.Util
{
    public class NewsTagXmlHelper
    {
        public static string GetInfoByNode(string fileName, string xpath)
        {
            XmlDocument doc = new XmlDocument();
            doc.Load(xmlRootPath);
            XmlElement root = doc.DocumentElement;
            return root.SelectSingleNode(xpath).InnerText;
        }

        /// <summary>
        /// Sqlite数据库连接字符串
        /// </summary>
        private static readonly string xmlRootPath = HttpContext.Current.Request.PhysicalApplicationPath
          + "App_Data\\NewsDownloadRules\\";
    }
}
